home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet internetowy / Czytniki RSS / RSS Bandit 1.3.0.42 / RssBandit Installer.msi / _172FF5180BC61D3C6D240F14338A23AA / _7AF1CD842DF3406989A698F302477C12 < prev    next >
Text File  |  2004-12-24  |  9KB  |  210 lines

  1.         <xsl:stylesheet version='1.0' 
  2.                 xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
  3.                 xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
  4.                 xmlns:xhtml='http://www.w3.org/1999/xhtml'
  5.                 xmlns:slash='http://purl.org/rss/1.0/modules/slash/' 
  6.                 xmlns:dc='http://purl.org/dc/elements/1.1/' 
  7.                 exclude-result-prefixes='content slash dc'>
  8.  
  9.           <xsl:output method='xml' indent='yes' /> 
  10.           
  11.           
  12.       <!-- channel group newspaper -->
  13.         <xsl:template match="newspaper[@type='group']">
  14.             <html><head>
  15.             <title><xsl:value-of select='title'/></title>
  16.             <!-- <base href="{//channel/link}" /> -->
  17.           </head>
  18.           <body>
  19.             <xsl:for-each select="//channel">
  20.             <xsl:choose>
  21.                   <xsl:when test="current()/image">
  22.                 <div class="PostTitle" style="FLOAT: right">
  23.                     <a href="{current()/image/link}" title="{current()/image/title}"><img src="{current()/image/url}"  alt="{current()/image/title}" border="0">
  24.                         <xsl:if test="current()/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="current()/image/width"/></xsl:attribute></xsl:if>
  25.                         <xsl:if test="current()/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="current()/image/height"/></xsl:attribute></xsl:if>
  26.                     </img></a>
  27.                 </div>
  28.             </xsl:when>
  29.             <xsl:otherwise>
  30.                   <div class="PostTitle" style="FLOAT: right">
  31.                       <a href="{current()/link}"><xsl:value-of select="current()/title" /></a>
  32.                 </div>
  33.             </xsl:otherwise>
  34.             </xsl:choose>
  35.             <xsl:for-each select='current()//item'>
  36.             <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
  37.             <td valign="top" bgcolor="#006666">    
  38.               <font
  39.                face="arial,helvetica" size="4" color="#FFFFFF">
  40.             <b><xsl:value-of  disable-output-escaping='yes' select='current()/title'/></b></font></td>
  41.             </tr></table>
  42.             <xsl:choose>
  43.               <xsl:when test='current()/author'>
  44.                 <b>Posted by <xsl:value-of select='current()/author'/></b>
  45.               </xsl:when>
  46.               <xsl:when test='current()/dc:creator'>
  47.                 <b>Posted by <xsl:value-of select='current()/dc:creator'/></b>
  48.               </xsl:when>                
  49.             </xsl:choose>
  50.             <b><xsl:text> </xsl:text> on <xsl:value-of select='current()/pubDate'/></b><br />
  51.             <xsl:if test='current()/category'><b><font size="2">from the 
  52.             <xsl:value-of select='current()/category' /> dept.<b></b></font></b></xsl:if>
  53.             <br />
  54.             <xsl:choose>
  55.               <xsl:when test='current()/xhtml:body'>
  56.                 <xsl:copy-of select='current()/xhtml:body'/>
  57.               </xsl:when>
  58.               <xsl:when test='current()/content:encoded'>
  59.                 <xsl:value-of  disable-output-escaping='yes' select='current()/content:encoded'/>
  60.               </xsl:when>
  61.               <xsl:otherwise>
  62.                 <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
  63.               </xsl:otherwise>
  64.             </xsl:choose>
  65.             <p>
  66.               <b>(</b>
  67.               <a href='{current()/link}'><b>Read on...</b></a> 
  68.                <xsl:choose>
  69.   <xsl:when test='current()/comments'> |<xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  70.   <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  71.   <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  72.   </xsl:when> 
  73.    <xsl:when test='current()/slash:comments'> |
  74.     <xsl:value-of select='current()/slash:comments'/> Comments...    
  75.   </xsl:when> 
  76.   </xsl:choose>        
  77.             <b>)</b>
  78.               </p>
  79.             </xsl:for-each>
  80.             <hr />
  81.             </xsl:for-each>
  82.               </body></html>
  83.             </xsl:template>
  84.  
  85.  
  86.           <!-- channel newspaper -->
  87.         <xsl:template match="newspaper[@type='channel']">
  88.             <html><head>
  89.             <title><xsl:value-of select='//channel/title'/></title>
  90.             <base href="{//channel/link}" />
  91.           </head>
  92.           <body>
  93.             <xsl:choose>
  94.                   <xsl:when test="//channel/image">
  95.                 <div class="PostTitle" style="FLOAT: right">
  96.                     <a href="{//channel/image/link}" title="{//channel/image/title}"><img src="{//channel/image/url}"  alt="{//channel/image/title}" border="0">
  97.                         <xsl:if test="//channel/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="//channel/image/width"/></xsl:attribute></xsl:if>
  98.                         <xsl:if test="//channel/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="//channel/image/height"/></xsl:attribute></xsl:if>
  99.                     </img></a>
  100.                 </div>
  101.             </xsl:when>
  102.             <xsl:otherwise>
  103.                   <div class="PostTitle" style="FLOAT: right">
  104.                       <a href="{//channel/link}"><xsl:value-of select="//channel/title" /></a>
  105.                 </div>
  106.             </xsl:otherwise>
  107.             </xsl:choose>
  108.             <xsl:for-each select='//item'>
  109.             <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
  110.             <td valign="top" bgcolor="#006666">    
  111.               <font
  112.                face="arial,helvetica" size="4" color="#FFFFFF">
  113.             <b><xsl:value-of  disable-output-escaping='yes' select='current()/title'/></b></font></td>
  114.             </tr></table>
  115.             <xsl:choose>
  116.               <xsl:when test='current()/author'>
  117.                 <b>Posted by <xsl:value-of select='current()/author'/></b>
  118.               </xsl:when>
  119.               <xsl:when test='current()/dc:creator'>
  120.                 <b>Posted by <xsl:value-of select='current()/dc:creator'/></b>
  121.               </xsl:when>                
  122.             </xsl:choose>
  123.             <b><xsl:text> </xsl:text> on <xsl:value-of select='current()/pubDate'/></b><br />
  124.             <xsl:if test='current()/category'><b><font size="2">from the 
  125.             <xsl:value-of select='current()/category' /> dept.<b></b></font></b></xsl:if>
  126.             <br />
  127.             <xsl:choose>
  128.               <xsl:when test='current()/xhtml:body'>
  129.                 <xsl:copy-of select='current()/xhtml:body'/>
  130.               </xsl:when>
  131.               <xsl:when test='current()/content:encoded'>
  132.                 <xsl:value-of  disable-output-escaping='yes' select='current()/content:encoded'/>
  133.               </xsl:when>
  134.               <xsl:otherwise>
  135.                 <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
  136.               </xsl:otherwise>
  137.             </xsl:choose>
  138.             <p>
  139.               <b>(</b>
  140.               <a href='{current()/link}'><b>Read on...</b></a> 
  141.               <xsl:choose>
  142.   <xsl:when test='current()/comments'> |<xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  143.   <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  144.   <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  145.   </xsl:when> 
  146.    <xsl:when test='current()/slash:comments'> |
  147.     <xsl:value-of select='current()/slash:comments'/> Comments...    
  148.   </xsl:when> 
  149.   </xsl:choose>        
  150.             <b>)</b>
  151.               </p>
  152.             </xsl:for-each>
  153.               </body></html>
  154.             </xsl:template>
  155.  
  156.  
  157.           <!-- single news item -->
  158.           <xsl:template match="newspaper[@type='newsitem']">
  159.             <html><head>
  160.             <title><xsl:value-of select='//item/title'/></title>
  161.             <base href="{//item/link}" />
  162.           </head>
  163.           <body>
  164.             <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
  165.             <td valign="top" bgcolor="#006666">    
  166.               <font
  167.                face="arial,helvetica" size="4" color="#FFFFFF">
  168.             <b><xsl:value-of  disable-output-escaping='yes' select='//item/title'/></b></font></td>
  169.             </tr></table>
  170.             <xsl:choose>
  171.               <xsl:when test='//item/author'>
  172.                 <b>Posted by <xsl:value-of select='//item/author'/></b>
  173.               </xsl:when>
  174.               <xsl:when test='//item/dc:creator'>
  175.                 <b>Posted by <xsl:value-of select='//item/dc:creator'/></b>
  176.               </xsl:when>                
  177.             </xsl:choose>
  178.             <b><xsl:text> </xsl:text> on <xsl:value-of select='//item/pubDate'/></b><br />
  179.             <xsl:if test='//item/category'><b><font size="2">from the 
  180.             <xsl:value-of select='//item/category' /> dept.<b></b></font></b></xsl:if>
  181.             <br />
  182.             <xsl:choose>
  183.               <xsl:when test='//item/xhtml:body'>
  184.                 <xsl:copy-of select='//item/xhtml:body'/>
  185.               </xsl:when>
  186.               <xsl:when test='//item/content:encoded'>
  187.                 <xsl:value-of  disable-output-escaping='yes' select='//item/content:encoded'/>
  188.               </xsl:when>
  189.               <xsl:otherwise>
  190.                 <xsl:value-of disable-output-escaping='yes' select='//item/description'/>
  191.               </xsl:otherwise>
  192.             </xsl:choose>
  193.             <p>
  194.               <b>(</b>
  195.               <a href='{//item/link}'><b>Read on...</b></a> 
  196.               <xsl:choose>
  197.   <xsl:when test='//item/comments'> |<xsl:text disable-output-escaping='yes'>&nbsp;</xsl:text> 
  198.   <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of  disable-output-escaping='yes' select='//item/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text> 
  199.   <xsl:value-of select='//item/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>    
  200.   </xsl:when> 
  201.    <xsl:when test='//item/slash:comments'> |
  202.     <xsl:value-of select='//item/slash:comments'/> Comments...    
  203.   </xsl:when> 
  204.   </xsl:choose>    
  205.             <b>)</b>
  206.               </p>
  207.               
  208.               </body></html>
  209.             </xsl:template>
  210.           </xsl:stylesheet>